package com.gitee.huanminabc.utils_test;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program: java-huanmin-utils
 * @description:
 * @author: huanmin
 * @create: 2024-12-12 18:52
 **/
// 开启基于注解的dubbo功能
@EnableDubbo
// DataSourceAutoConfiguration取消自动装配数据源, 我们自己配置数据源
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan({"com.gitee.huanminabc.**.mapper"})
@EnableAspectJAutoProxy(proxyTargetClass = true) //开启AOP的动态代理,这样可以不用实现接口就能使用AOP
@EnableTransactionManagement
//扫描服务和工具包
@ComponentScan(basePackages = {"com.gitee.huanminabc.**"})
public class DubboProviderApplication {
    public static void main(String[] args) {
        SpringApplication.run(DubboProviderApplication.class, args);
    }
}
